package com.itheima.day02.Test03;

import java.util.concurrent.CountDownLatch;

public class ChildrenThread02 extends Thread {
    private CountDownLatch countDownLatch;
    public ChildrenThread02(CountDownLatch countDownLatch) {
        this.countDownLatch=countDownLatch;
    }
    @Override
    public void run() {
        for (int i = 1; i <= 15; i++) {
            System.out.println(getName()+"吃第"+i+"个饺子");
        }
        //说吃完了
        countDownLatch.countDown();
    }
}
